package com.sj.anno;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

//Component Controller Service Repository
//这四个注解功能是一样的，都创建对象
@Component(value = "user")  //<bean id="user" class=""/>
@Scope(value = "singleton") //prototype singleton
public class User {
    public void add() {
        System.out.println("add...............");
    }
}
